home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1999 March / EnigmA AMIGA RUN 35 (1999)(G.R. Edizioni)(IT)[!][issue 1999-03].iso / earcd / devel / vbcc-68k-src / machines / amiga68k / include / stdlib.h < prev    next >
C/C++ Source or Header  |  1999-01-01  |  2KB  |  100 lines

  1. #ifndef __STDLIB_H
  2. #define __STDLIB_H 1
  3.  
  4. #ifndef __SIZE_T
  5. #define __SIZE_T 1
  6. typedef unsigned long size_t;
  7. #endif
  8.  
  9. #ifndef __WCHAR_T
  10. #define __WCHAR_T 1
  11. typedef char wchar_t;
  12. #endif
  13.  
  14. #undef NULL
  15. #define NULL ((void *)0)
  16.  
  17. #undef EXIT_FAILURE
  18. #define EXIT_FAILURE 20
  19. #undef EXIT_SUCCESS
  20. #define EXIT_SUCCESS 0
  21.  
  22. #undef RAND_MAX
  23. #define RAND_MAX 32768
  24.  
  25. void exit(int);
  26. void *malloc(size_t);
  27. void *calloc(size_t,size_t);
  28. void *realloc(void *,size_t);
  29. void free(void *);
  30. int system(const char *);
  31. int rand(void);
  32. void srand(unsigned int);
  33. double atof(const char *);
  34. int atoi(const char *);
  35. long atol(const char *);
  36. double strtod(const char *,char **);
  37. long strtol(const char *,char **,int);
  38. unsigned long strtoul(const char *,char **,int);
  39. void abort(void);
  40. int atexit(void (*)(void));
  41. char *getenv(const char *);
  42. void *bsearch(const void *,const void *,size_t,size_t,int (*)(const void *,const void *));
  43. void qsort(void *,size_t,size_t,int (*)(const void *,const void *));
  44. int abs(int);
  45. long labs(long);
  46.  
  47. typedef struct {
  48.     int quot,rem;
  49. } div_t;
  50.  
  51. typedef struct {
  52.     long quot,rem;
  53. } ldiv_t;
  54.  
  55. div_t div(int,int);
  56. ldiv_t ldiv(long,long);
  57.  
  58. extern size_t _nalloc;
  59.  
  60. #define atof(s) strtod((s),(char **)NULL)
  61. #define atoi(s) (int)strtol((s),(char **)NULL,10)
  62. #define atol(s) strtol((s),(char **)NULL,10)
  63.  
  64. struct __exitfuncs{
  65.     struct __exitfuncs *next;
  66.     void (*func)(void);
  67. };
  68.  
  69. #ifdef __INLINE_ALL
  70. #define __INLINE_ABS
  71. #define __INLINE_LABS
  72. #define __INLINE_DIV
  73. #define __INLINE_LDIV
  74. #endif
  75.  
  76. #ifdef __INLINE_ABS
  77. #pragma only-inline on
  78. #include "vbcc:libsrc/stdlib/abs.c"
  79. #pragma only-inline off
  80. #endif
  81. #ifdef __INLINE_LABS
  82. #pragma only-inline on
  83. #include "vbcc:libsrc/stdlib/labs.c"
  84. #pragma only-inline off
  85. #endif
  86. #ifdef __INLINE_DIV
  87. #pragma only-inline on
  88. #include "vbcc:libsrc/stdlib/div.c"
  89. #pragma only-inline off
  90. #endif
  91. #ifdef __INLINE_LDIV
  92. #pragma only-inline on
  93. #include "vbcc:libsrc/stdlib/ldiv.c"
  94. #pragma only-inline off
  95. #endif
  96.  
  97.  
  98. #endif
  99.  
  100.